﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace NHEntity
{
    [Serializable]
    public class UserEntity : IEquatable<UserEntity>
    {
        private IList userRoleLines;

        public UserEntity()  
        {
            userRoleLines = new List<UserRoleEntity>();
        }

        public virtual int IdUser
        {
            set;
            get;
        }

        public virtual string Login
        {
            set;
            get;
        }

        public virtual string Password
        {
            set; get;
        }

        public virtual IList UserRoleLines
        {
            set
            {
                userRoleLines = value;
            }
            get
            {
                return(userRoleLines);
            }
        }

        public virtual bool Equals(UserEntity other)
        {
            if(ReferenceEquals(other,this))
            {
                return true;
            }
            return false;
        }
    }
}